package ms.unicorn.erml.figures;

import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gmf.runtime.diagram.ui.figures.ShapeCompartmentFigure;
import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode;

public class CompartmentFigure extends ShapeCompartmentFigure {

	public CompartmentFigure(String title, IMapMode mm) {
		super(title, mm);
	}
	
	@Override
	public boolean isVisible() {
		boolean vis = super.isVisible() && isExpanded();
		return vis;
	}

	@Override
	public Rectangle getBounds() {
		return getParent() != null ? getParent().getBounds().getCopy(): new Rectangle();
	}
}
